﻿using Common.Data.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Warranty.Configuration;
using Warranty.Model.Model;

namespace Warranty.DBConfig
{
    public class WorkOrderConfiguration : DBConfig<WorkOrder>
    {
        public WorkOrderConfiguration()
            : base(SystemConfiguration.Schema, SystemConfiguration.NamingType, SystemConfiguration.TABLE_PREFIX)
        {
            HasKey(k => new { k.Work_Order, k.PartNo });
            Property(c => c.PartNo).IsRequired();
            Property(c => c.ScheduledCompletionDate).IsRequired();
            Property(c => c.Work_Order).IsRequired();
        }
    }
}
